package com.zy.cat.entity.pdd;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pdd.pop.ext.fasterxml.jackson.annotation.JsonProperty;
import com.pdd.pop.sdk.http.api.pop.response.PddDdkGoodsDetailResponse.GoodsDetailResponseGoodsDetailsItem;
import com.pdd.pop.sdk.http.api.pop.response.PddDdkGoodsSearchResponse.GoodsSearchResponseGoodsListItem;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("拼多多商品实体类")
public class PddShops implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@ApiModelProperty(value = "商品ID", example = "0")
	private long goods_id;
	@ApiModelProperty(value = "商品名称", example = "0")
	private String goods_name="";
	@ApiModelProperty(value = "商品描述", example = "0")
	private String goods_desc="";
	@ApiModelProperty(value = "商品缩略图", example = "0")
	private String goods_thumbnail_url="";
	@ApiModelProperty(value = "商品主图", example = "0")
	private String goods_image_url="";
	@ApiModelProperty(value = "商品轮播图", example = "0")
	private List<String> goods_gallery_urls;
	@ApiModelProperty(value = "最小拼团价（单位为分）", example = "0")
	private long min_group_price;
	@ApiModelProperty(value = "最小单买价格（单位为分）", example = "0")
	private long min_normal_price;
	
	@JsonIgnore
	@ApiModelProperty(value = "该商品所在店铺是否参与全店推广，0：否，1：是", example = "0")
	private int mall_cps;
	@ApiModelProperty(value = "商品是否有优惠券 true-有，false-没有", example = "0")
	private boolean has_coupon;
	@ApiModelProperty(value = "优惠券门槛价格，单位为分", example = "0")
	private long coupon_min_order_amount;
	@ApiModelProperty(value = "优惠券面额，单位为分", example = "0")
	private long coupon_discount;
	@ApiModelProperty(value = "优惠券总数量", example = "0")
	private long coupon_total_quantity;
	@ApiModelProperty(value = "优惠券剩余数量", example = "0")
	private long coupon_remain_quantity;
	
  
	
	@JsonIgnore
	@ApiModelProperty(value = "佣金比例，千分比", example = "0")
	private long promotion_rate;
	
	/**
	 * 比价行为预判定佣金，需要用户备案
	 */
	@JsonIgnore
	@ApiModelProperty(value = "佣金比例，千分比", example = "0")
	@JsonProperty("predict_promotion_rate")
	private Long predictPromotionRate;
	
	@ApiModelProperty(value = "服务标签: 4-送货入户并安装,5-送货入户,6-电子发票,9-坏果包赔,11-闪电退款,12-24小时发货,13-48小时发货,17-顺丰包邮,18-只换不修,19-全国联保,20-分期付款,24-极速退款,25-品质保障,26-缺重包退,27-当日发货,28-可定制化,29-预约配送,1000001-正品发票,1000002-送货入户并安装", example = "0")
	private List<Long> service_tags=new ArrayList<Long>();
	
	@ApiModelProperty(value = "已售卖件数", example = "0")
	private String sales_tip="";
	
	@ApiModelProperty(value = "描述分", example = "0")
	private String desc_txt="";
	@ApiModelProperty(value = "服务分", example = "0")
	private String serv_txt="";
	@ApiModelProperty(value = "物流分", example = "0")
	private String lgst_txt="";
	
	@ApiModelProperty(value = "店铺名字", example = "0")
	private String mall_name;
	
	@ApiModelProperty(value = "单买返利积分", example = "0")
	private long dfcode;
	
	@ApiModelProperty(value = "拼团返利积分", example = "0")
	private long pfcode;
	
//	@JsonIgnore
//	@ApiModelProperty(value = "是否有店铺券", example = "false")
//	private boolean has_mall_coupon;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券ID", example = "0")
//	private Long mall_coupon_id;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券折扣", example = "0")
//	private int mall_coupon_discount_pct;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券最小使用金额", example = "0")
//	private int coupon_min_order_amount;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券最大使用金额", example = "0")
//	private int coupon_max_discount_amount;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券总量", example = "0")
//	private int coupon_total_quantity;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券余量", example = "0")
//	private int coupon_remain_quantity;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券开始使用时间", example = "0")
//	private String coupon_start_time;
//	@JsonIgnore
//	@ApiModelProperty(value = "店铺券结束使用时间", example = "0")
//	private String coupon_end_time;
	


//	@ApiModelProperty(value = "店铺类型，1-个人，2-企业，3-旗舰店，4-专卖店，5-专营店，6-普通店", example = "0")
//	private int merchant_type;
//	@JsonIgnore
//	@ApiModelProperty(value = "商品类目ID", example = "0")
//	private int category_id;
//	@JsonIgnore
//	@ApiModelProperty(value = "商品类目名", example = "0")
//	private String category_name;
//	@JsonIgnore
//	@ApiModelProperty(value = "商品标签ID", example = "0")
//	private int opt_id;
//	@JsonIgnore
//	@ApiModelProperty(value = "商品标签名", example = "0")
//	private String opt_name;
//	@JsonIgnore

//	@JsonIgnore
//	@ApiModelProperty(value = "商品类目id", example = "0")
//	private List<Integer> cat_ids;

//	@ApiModelProperty(value = "优惠券生效时间", example = "0")
//	private String coupon_start_time;
//	@ApiModelProperty(value = "优惠券失效时间", example = "0")
//	private String coupon_end_time;
	
//	@ApiModelProperty(value = "商品标签id", example = "0")
//	private List<Long> opt_ids;
	

	
//	@JsonIgnore
//	@ApiModelProperty(value = "推广计划类型 3:定向 4:招商", example = "0")
//	private int plan_type;
//	@JsonIgnore
//	@ApiModelProperty(value = "招商团长id", example = "0")
//	private int zs_duo_id;
	


	public PddShops( GoodsSearchResponseGoodsListItem  shops) {
		super();
//		this.has_mall_coupon = shops.getHasMallCoupon();
//		this.mall_coupon_id = shops.getMallCouponId();
//		this.mall_coupon_discount_pct = mall_coupon_discount_pct;
//		this.mall_coupon_min_order_amount = mall_coupon_min_order_amount;
//		this.mall_coupon_max_discount_amount = mall_coupon_max_discount_amount;
//		this.mall_coupon_total_quantity = mall_coupon_total_quantity;
//		this.mall_coupon_remain_quantity = mall_coupon_remain_quantity;
//		this.mall_coupon_start_time = mall_coupon_start_time;
//		this.mall_coupon_end_time = mall_coupon_end_time;
		this.goods_id = shops.getGoodsId();
		this.goods_name = shops.getGoodsName();
		this.goods_desc = shops.getGoodsDesc();
		this.goods_thumbnail_url = shops.getGoodsThumbnailUrl();
		this.goods_image_url = shops.getGoodsImageUrl();
		this.goods_gallery_urls = shops.getGoodsGalleryUrls()==null?new ArrayList<String>():shops.getGoodsGalleryUrls();
		this.min_group_price = shops.getMinGroupPrice();
		this.min_normal_price = shops.getMinNormalPrice();
		this.mall_name = shops.getMallName();
//		this.merchant_type = merchant_type;
//		this.category_id = category_id;
//		this.category_name = category_name;
//		this.opt_id = opt_id;
//		this.opt_name = opt_name;
//		this.opt_ids = shops.getOptIds();
// 		this.cat_ids = cat_ids;
		this.mall_cps = shops.getMallCps();
		this.has_coupon = shops.getHasCoupon();
		this.coupon_min_order_amount = shops.getCouponMinOrderAmount();
		this.coupon_discount = shops.getCouponDiscount();
		this.coupon_total_quantity = shops.getCouponTotalQuantity();
		this.coupon_remain_quantity = shops.getCouponRemainQuantity();
//		this.coupon_start_time = coupon_start_time;
//		this.coupon_end_time = coupon_end_time;
		this.promotion_rate = shops.getPromotionRate();
		this.predictPromotionRate=shops.getPredictPromotionRate();
		this.sales_tip = shops.getSalesTip();
		this.service_tags = shops.getServiceTags();
		this.desc_txt = shops.getDescTxt();
		this.serv_txt = shops.getServTxt();
		this.lgst_txt = shops.getLgstTxt();
//		this.plan_type = plan_type;
//		this.zs_duo_id = zs_duo_id;
	}
	
	
	public PddShops( GoodsDetailResponseGoodsDetailsItem  shops) {
		super();
//		this.has_mall_coupon = shops.getHasMallCoupon();
//		this.mall_coupon_id = shops.getMallCouponId();
//		this.mall_coupon_discount_pct = mall_coupon_discount_pct;
//		this.mall_coupon_min_order_amount = mall_coupon_min_order_amount;
//		this.mall_coupon_max_discount_amount = mall_coupon_max_discount_amount;
//		this.mall_coupon_total_quantity = mall_coupon_total_quantity;
//		this.mall_coupon_remain_quantity = mall_coupon_remain_quantity;
//		this.mall_coupon_start_time = mall_coupon_start_time;
//		this.mall_coupon_end_time = mall_coupon_end_time;
		this.goods_id = shops.getGoodsId();
		this.goods_name = shops.getGoodsName();
		this.goods_desc = shops.getGoodsDesc();
		this.goods_thumbnail_url = "";
		this.goods_image_url = shops.getGoodsImageUrl();
		this.goods_gallery_urls = shops.getGoodsGalleryUrls()==null?new ArrayList<String>():shops.getGoodsGalleryUrls();
		this.min_group_price = shops.getMinGroupPrice();
		this.min_normal_price = shops.getMinNormalPrice();
//		this.mall_name = mall_name;
//		this.merchant_type = merchant_type;
//		this.category_id = category_id;
//		this.category_name = category_name;
//		this.opt_id = opt_id;
//		this.opt_name = opt_name;
//		this.opt_ids = shops.getOptIds();
// 		this.cat_ids = cat_ids;
//		this.mall_cps = shops.getMallCps();
//		this.has_coupon = shops.getHasCoupon();
		this.coupon_min_order_amount = shops.getCouponMinOrderAmount();
		this.coupon_discount = shops.getCouponDiscount();
		this.coupon_total_quantity = shops.getCouponTotalQuantity();
		this.coupon_remain_quantity = shops.getCouponRemainQuantity();
//		this.coupon_start_time = coupon_start_time;
//		this.coupon_end_time = coupon_end_time;
		this.promotion_rate = shops.getPromotionRate();
		this.predictPromotionRate=shops.getPredictPromotionRate();
		this.sales_tip = shops.getSalesTip();
		if( shops.getServiceTags()!=null&& !shops.getServiceTags().isEmpty()) {
			this.service_tags=new ArrayList<Long>();
			shops.getServiceTags().forEach(action->{
				this.service_tags.add(action.longValue());
			});
		}
		this.desc_txt = shops.getDescTxt();
		this.serv_txt = shops.getServTxt();
		this.lgst_txt = shops.getLgstTxt();
//		this.plan_type = plan_type;
//		this.zs_duo_id = zs_duo_id;
	}
	
}
